import requests

url = 'https://wx1.sinaimg.cn/mw690/0078WY2egy1hrx96tfimpj30u0190tc5.jpg'
headers = {
    'Referer': 'https://weibo.com/', # 不加这个图片数据是无法成功返回的
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
}
resp = requests.get(url, headers=headers)
with open('1.jpg', 'wb') as f:
    f.write(resp.content)
